package com.ynwt.controller;

import com.ynwt.model.front.SignRankBean;
import com.ynwt.service.RankService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by huangying on 2017/5/31.
 */
@RestController
@RequestMapping("/api")
public class FrontController {

    @RequestMapping("/today-sign-rank")
    public String signRank(
            @RequestParam("page") Integer page,
            @RequestParam("page_size") Integer pageSize) {

        SignRankBean signRankBean = rankService.todaySignRank(page, pageSize);

        return signRankBean.toString();

    }

    @Autowired
    private RankService rankService;
}
